Skip to content

feat(cmp): add stdin support for Config Management Plugins#25917

Draft
glennpratt wants to merge 1 commit intoargoproj:masterfrom
glennpratt:plugin-stdin
Draft

feat(cmp): add stdin support for Config Management Plugins#25917
glennpratt wants to merge 1 commit intoargoproj:masterfrom
glennpratt:plugin-stdin

Conversation

@glennpratt
Copy link
Copy Markdown

@glennpratt glennpratt commented Jan 9, 2026

This change introduces a new stdin field to the Application spec under source.plugin.stdin. The stdin value is interpolated with standard build environment variables and then passed via standard input to the CMP's generate, discover, and parameters commands.

This allows passing large payloads to plugins without hitting exceeding limits on things passed as argument to execve, including environment variables:

  • Linux MAX_ARG_STRLEN is 128 KB (a single argument, e.g. a single environment variable)
  • Linux MAX_ARG is generally 2 MB

Both of these appear as fork/exec $path: argument list too long errors.

Fixes #17914

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Title of the PR
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

@bunnyshell
Copy link
Copy Markdown

bunnyshell Bot commented Jan 9, 2026

❌ Preview Environment undeployed from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

This change introduces a new `stdin` field to the Application spec under `source.plugin.stdin`.
The `stdin` value is interpolated with standard build environment variables and then passed
via standard input to the CMP's `generate`, `discover`, and `parameters` commands.

This allows passing large payloads to plugins without hitting exceeding limits
on environment variables passing through execve:
- Linux MAX_ARG_STRLEN is 128 KB
- Linux MAX_ARG is generally 2 MB

Both of these appear as `fork/exec PATH: argument list too long` errors.

Fixes argoproj#17914

Signed-off-by: Glenn Pratt <gpratt@akamai.com>
@taliesins
Copy link
Copy Markdown

We have run into this issue as well. If we could just write directly to a temp file and then refer to the temp file that would be great too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Argument list too long. In an argoCD sidecar plugin.

2 participants